﻿using System.Collections.Generic;
using System.Threading.Tasks;
using System.Threading;
using SIG.Model.Blogs;

namespace SIG.Service.Blogs
{
    public interface IPostService : IEntityService<Post>
    {
        Task<IList<Post>> GetActiveElementsAync(CancellationToken cancellationToken = default(CancellationToken));
        Post GetPostDetail(int id);
        List<Post> GetPagedActiveElements(int pageIndex, int pageSize, string keyword, int? categoryId, out int totalCount);
        List<Post> GetPagedElements(int pageIndex, int pageSize, string keyword, int? categoryId, out int totalCount);
        IEnumerable<Post> RecommendPosts(int count);
        IEnumerable<Post> LatesterPosts(int count);
        IEnumerable<Post> LatesterPosts(int count, int categoryId);
    }
}
